


        Vue.component('v-footer',{
            template:`<footer>
            <p class="colorLine ready"><img v-if="commonIcon.length" :src="commonIcon[0]" class="obj-c" alt=""></p>
            <div class="fluid">
                <div class="content flex">
                        <div class="storeBox" v-if="headoffice.length" v-html="headoffice[0].htmlContent"></div>
                        <div class="addr box">
                            <p v-if="headoffice.length">{{headoffice[0].category}}</p>
                            <div class="list">
                            </div>
                        </div>
                        <div class="others box">
                            <p v-if="loc.length">{{loc[0].category}}</p>
                            <ul class="list flex">
                                <li v-for="(item,i) in loc" v-html="item.htmlContent">
                                </li>
                            </ul>
                        </div>
                        <div class="links box">
                            <p>Quick Links</p>
                            <div class="list">
                                <a :href="item.visitUrl" v-for="(item,i) in nav">{{item.name}}</a>
                            </div>
                        </div>
                </div>
                
                <i></i>
                <div class="footage flex flex-align-items">
                        <p>{{webBasicInf.copyright}}</p>
                        <p class="sc">
                            <a :href="item.visitUrl" v-for="(item,i) in society" title="item.name">
                                <img :src="item.imagePath" alt="link icon">
                            </a>
                        </p>
                </div>
            </div>
            
        </footer>`,
            data:function(){
                return{
                  webBasicInf:{},
                  nav:[],
                  //currentLinkInd:'',
                  commonIcon:[],
                  headoffice:[],
                  loc:[],
                  society:[]
                }
            },
            created:function(){
              //获取网站基本信息
              axios.get(dataUrl + 'api/getWebsite',{
                headers:{
                  Authorization: headers
                }
              })
              .then((res) => {
                //console.log(res.data.data);
                this.webBasicInf = res.data.data;
              })
              //获取head office
                axios.post(dataUrl + 'api/getArchivesDetails',{ext06:0,id:86,size:10000,page:1},{
                    headers:{
                        Authorization: headers
                    }
                })
                .then((res) => {
                    //console.log(res.data.data.list);
                    this.headoffice = res.data.data.list;
                });
              //获取导航栏
              axios.get(dataUrl + 'api/getNavbar',{
                headers:{
                  Authorization: headers
                }
              })
              .then((res) => {
                this.nav = res.data.data;
                //console.log(this.nav);
                var This = this;
                setTimeout(function(){
                  for(var p = 0;p < $('footer .content .storeBox').find('p').length;p++){
                        var html = $('footer .content .storeBox').find('p')[p].innerHTML;
                        if(html.indexOf('<br>') >= 0 || (html.indexOf('img') >= 0 && html.indexOf('src') >= 0)){
                            $('footer .content .storeBox p:eq(' + p + ')').remove();
                            p -= 1;
                        }
                    }
                    $('footer .content .storeBox p:first-child').remove();
                    $('footer .content .storeBox').append('<p>Tel:' + This.webBasicInf.tel + '</p>');
                    $('footer .content .box.addr .list').html($('footer .content .storeBox').html());
                },10)
              });

            

            //获取地址列表
            axios.post(dataUrl + 'api/getArchivesDetails',{ext06:0,id:87,size:10000,page:1},{
                headers:{
                    Authorization: headers
                }
            })
            .then((res) => {
                //console.log(res.data.data);
                this.loc = res.data.data.list;
            })

            

              //获取公共图标
              axios.post(dataUrl + 'api/getBanner',{identification:'COMMON_ICON'},{
                headers:{
                  Authorization: headers
                }
              })
              .then((res) => {
                //console.log(res.data.data);
                for(var n = 0;n < res.data.data.length;n++){
                  if(res.data.data[n].remark == 'footLine'){
                    this.commonIcon.push(res.data.data[n].imgPath);
                  }
                }
              });
              //获取网站基本信息
              axios.get(dataUrl + 'api/getPartner',{
                headers:{
                  Authorization: headers
                }
              })
              .then((res) => {
                //console.log(res.data.data);
                this.society = res.data.data;
              })
            }
        });